"""
ComfyUI Deforum-X-Flux Nodes
Professional video animation nodes for ComfyUI

Transform research into reality with AI-powered video generation.
Based on cutting-edge Deforum-X-Flux research with FLUX model integration.

🎬 Features:
- Mathematical motion control with expressions
- 2D/3D animation modes with depth warping
- FLUX model integration for high-quality generation
- Professional video output with FFmpeg
- Keyframe-based prompt scheduling
- Hybrid video composition capabilities

🚀 Installation:
1. Copy this folder to ComfyUI/custom_nodes/
2. Install dependencies: pip install -r requirements.txt
3. Restart ComfyUI

📚 Documentation:
See README.md for complete usage guide and examples.

Author: Generated by MCP Multi-Agent Framework
License: MIT
Version: 1.0.0
"""

import os
import sys

# Add current directory to path for imports
current_dir = os.path.dirname(os.path.abspath(__file__))
if current_dir not in sys.path:
    sys.path.append(current_dir)

try:
    from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
    print("✅ Deforum-X-Flux nodes loaded successfully")
except Exception as e:
    print(f"❌ Error loading Deforum-X-Flux nodes: {e}")
    # Create empty mappings as fallback
    NODE_CLASS_MAPPINGS = {}
    NODE_DISPLAY_NAME_MAPPINGS = {}

# Web directory for custom UI components
WEB_DIRECTORY = "./web"

# Export for ComfyUI
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]

# Package metadata
__version__ = "1.0.0"
__author__ = "MCP Multi-Agent Framework"
__description__ = "Professional video animation nodes for ComfyUI based on Deforum-X-Flux research"
__license__ = "MIT"

# ComfyUI integration
WEB_DIRECTORY = "./web"

# Version info for ComfyUI manager
def get_extension_info():
    return {
        "name": "ComfyUI Deforum-X-Flux Nodes",
        "version": __version__,
        "description": __description__,
        "author": __author__,
        "license": __license__,
        "nodes": list(NODE_CLASS_MAPPINGS.keys()),
        "node_count": len(NODE_CLASS_MAPPINGS),
        "categories": ["Deforum-X-Flux"],
        "requirements": [
            "torch>=2.0.0",
            "torchvision>=0.15.0", 
            "opencv-python>=4.5.0",
            "pandas>=1.3.0",
            "numexpr>=2.8.0",
            "numpy>=1.21.0"
        ],
        "optional_requirements": [
            "ffmpeg-python>=0.2.0",
            "transformers>=4.20.0",
            "diffusers>=0.20.0"
        ]
    }
